import {createRouter, createWebHistory} from 'vue-router'

const router = createRouter({
    history: createWebHistory(import.meta.env.BASE_URL),
    routes: [
        {path: '/', redirect: 'home'},
        {
            path: '/home', name: 'home', component: () => import('../views/Home.vue'), children: [
                {path: 'Aaa', name: 'aaa', component: () => import('../views/Aaa.vue')},
                {path: 'Bbb', name: 'bbb', component: () => import('../views/Bbb.vue')},
                {path: 'Data', name: 'data', component: () => import('../views/Data.vue')},
            ]
        },
        {path: '/404', name: '404', component: () => import('../views/404.vue')},
        {path:'/:pathMatch(.*)',redirect:'404'}
    ],
})

export default router
